/*
 * Copyright 2007-2008 Andrew O'Malley
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package ws.quokka.plugin.javadoc;

import org.apache.tools.ant.taskdefs.Javadoc;

import ws.quokka.core.plugin_spi.support.AbstractPlugin;
import ws.quokka.core.plugin_spi.support.Setter;


/**
 *
 */
public class JavadocPlugin extends AbstractPlugin {
    //~ Methods --------------------------------------------------------------------------------------------------------

    public void javadocReport() {
        Javadoc javadoc = (Javadoc)getUtils().init(new Javadoc(), "javadoc");
        String[] attributes = new String[] {
                "sourcePath", "sourcePathRef", "sourceFiles", "destDir", "maxMemory", "packageNames", "packageList",
                "classPath", "bootClassPath", "classPathRef", "bootClassPathRef", "extDirs", "overview", "access",
                "public", "protected", "package", "private", "old", "verbose", "locale", "encoding", "version", "use",
                "author", "splitIndex", "windowTitle", "docTitle", "header", "footer", "bottom", "link", "linkOffline",
                "group", "noDeprecated", "noDeprecatedlist", "noTree", "noIndex", "noHelp", "noNavBar", "serialWarn",
                "helpFile", "stylesheetFile", "charset", "docEncoding", "doclet", "docletPath", "docletPathRef",
                "additionalParam", "failOnError", "excludePackageNames", "defaultExcludes", "useExternalFile", "source",
                "linkSource", "breakIterator", "noQualifier", "includeNoSourcePackages", "executable"
            };
        Setter setter = new Setter(getProperties());
        setter.set(javadoc, attributes);
        javadoc.perform();
    }
}
